package dk.pun.dums.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import dk.pun.dums.shared.character.CharacterData;
import dk.pun.dums.shared.user.LoginInfo;
import dk.pun.dums.shared.user.UserData;

public interface DUMSServiceAsync {
	
	void login(String requestURL, AsyncCallback<LoginInfo> callback);
	void anonymousLogin(AsyncCallback<LoginInfo> callback);

	void getUserData(String userId, AsyncCallback<UserData> callback);
	void updateUserData(UserData userData, AsyncCallback<Void> callback);
	void deleteUserData(String userId, AsyncCallback<Void> callback);
	
	void findCharacterDataByUserKey(Long userKey, AsyncCallback<List<CharacterData>> callback);
	void createCharacterData(String name, Long userKey, AsyncCallback<CharacterData> callback);
	void getCharacterData(Long characterKey, AsyncCallback<CharacterData> callback);
	void updateCharacterData(CharacterData characterData, AsyncCallback<Void> callback);
	void deleteCharacterData(Long characterKey, AsyncCallback<Void> callback);
	
	void getMessage(AsyncCallback<String> callback);
	void setMessage(String message, AsyncCallback<Void> callback);
}
